// src/features/members/api/use-get-member.ts
import {MARK_DATA_URL} from "@/lib/social/constants";

export const useGetMember = async ({id}: { id: string }) => {
    // todo: get current user

    // 获取指定工作区的所有用户
    const res = await fetch(
        // `${MARK_DATA_URL}/members/${id}`,
        `/api/members/${id}`,
    )
    let member = await res.json()
    console.log('get member by id', member)
    // member = member.member
    let isLoading = member === undefined


    return {data: member, isLoading}
}